﻿using EmbeddedSharp.Core;

namespace EmbeddedSharp.Scripting
{
    public abstract class ContextFuncNode : FuncNode
    {
        /// <summary>
        /// Default constructor
        /// </summary>
        public ContextFuncNode()
        {
        }

        public ContextFuncNode(IContext context)
        {
            Context = context;
        }

        /// <summary>
        /// With function name in constructor
        /// </summary>
        /// <param name="value"></param>
        public ContextFuncNode(string value)
            : base(value)
        {
        }

        public ContextFuncNode(string name, IContext context)
            : base(name)
        {
            Context = context;
        }

        /// <summary>
        /// The context
        /// </summary>
        public IContext Context { get; set; }
    }
}